package com.love.cloud.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.love.cloud.admin.api.entity.NoticeMessage;
import com.love.cloud.admin.api.vo.MessageHandleReadVo;

import java.util.Set;

/**
 * @author hongdongqu
 */
public interface NoticeMessageService extends IService<NoticeMessage> {
    /**
     * 获取到消息信息分页
     * @param keyValue 关键字内容
     * @param keyType 关键字类型
     * @return
     */
    Object getMessagePageByKey(String keyValue, String keyType);

    /**
     * 保存消息
     * @param content
     * @param relationId
     * @param relationType
     * @param keyValues 关键字内容集合
     * @param keyType 关键字类型
     * @return
     */
    Object saveMessage(String content, Long relationId, String relationType, Set<String> keyValues, String keyType);

    /**
     * 执行阅读
     * @return
     */
    Object handleRead(MessageHandleReadVo messageHandleReadVo);

    /**
     * 执行全部已读
     */
    Object allHandleRead(MessageHandleReadVo messageHandleReadVo);

    /**
     * 获取到未读数量
     * @param keyValue 关键字内容
     * @param keyType 关键字类型
     * @return
     */
    Object getUnReadNum(String keyValue, String keyType);
}
